<?php

	error_reporting(E_ALL);
	ini_set('include_path','.' . PATH_SEPARATOR . dirname(__FILE__));
	
	require_once 'func/func.php';
	require_once 'lib/db/db.php';
	require_once 'lib/db/db_table.php';
	
	require_once 'lib/ierror.php';
	require_once 'lib/meta.php';
	require_once 'lib/controller.php';
	require_once 'lib/url.php';
	require_once 'lib/request.php';
	require_once 'lib/customtag.php';
	require_once 'lib/view.php';

	require_once 'lib/core.php';
	require_once 'lib/server.php';
	require_once 'lib/cache.php';
	
	// autoload models
    foreach (glob(_cfg("path")."/_inc/lib/model/*.php") as $model)
        include_once ($model);
		
	global $app;
	$app = new Core();